<?php
session_start ();
if (@! $_SESSION ["name"])
	exit ( "非法操作" );
require_once 'include/conn.php';
require_once 'include/Tool.class.php';
//组id
$id = $_POST ["id"];
$name = $_POST ["username"];
$remark = $_POST ["remark"];
$status = $_POST ["status"];
$time = $_POST ["time"];
date_default_timezone_set ( "PRC" );
$showtime = date ( "Y-m-d H:i:s" );
$tool = new Tool ();
$sql = "insert into member(name,groupId,remark,status,time,lastUpdateTime) values('" . $name . "'," . $id . ",'" . $remark . "','" . $status . "'," . $time . ",'" . $showtime . "')";
$result = mysql_query ( $sql );
$res = $tool->updateGroupStateByGroupId ( $id );
if ($result && $res) {
	echo "新增成功";
} else {
}
?>